import { ref, AsyncComponentLoader } from 'vue'
const Async:AsyncComponentLoader = () => new Promise((resolve, reject) => {
  setTimeout(() => {
    resolve({
      name: 'demo',
      setup(props) {
        const input = ref(null)
        const click = (e: MouseEvent) => {
          console.log(e)
          console.log(input.value)
        }
        return {
          click, input
        }
      },
      render() {
        return (
          <>
            <div>{this.input}</div>
            <button id="sdg" onClick={this.click}>点击</button>
            <input v-model={this.input} placeholder="啊这" />
          </>
        )
      }

    })
  }, 3000)
})

export default Async